<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=0">
  <meta http-equiv="Expires" content="0">
  <meta http-equiv="Pragma" content="no-cache">
  <meta http-equiv="Cache-control" content="no-cache">
  <meta http-equiv="Cache" content="no-cache">
  <link rel="icon" href="data:;base64,=">
  <title>测试iframe解析  </title>
  </head>
  <style>
  *{margin:0 auto;padding:0;box-sizing:border-box;}
  html,body{position:absolute;width:100%;height:100%;min-width:1366px;min-height:768px;background: linear-gradient(skyblue,khaki);}
  /* 定义滚动条宽度 */::-webkit-scrollbar {width:4px;height:4px;}
  /*定义滚动条  轨道背景色+圆角*/::-webkit-scrollbar-track {border-radius: 2px;background-color: #555;}
  /*定义滚动条  滑块背景色+圆角*/::-webkit-scrollbar-thumb {border-radius: 2px;background-color: #C3C4C3;}
  /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  #app{
    display:block;
    width:800px;
    height:600px;
    border:1px solid red;
  }
  
  </style>
<body>

  <!-- <iframe id="app" src="./test0.html" sandbox="allow-same-origin"></iframe> -->


</body>
</html>
<script>
var iframe=document.createElement('iframe');
var style=iframe.style;
    style.pointerEvents='none';
    style.width='0px';
    style.height='0px';
    style.visibility='hidden';
    style.position='absolute';     
    iframe.setAttribute('sandbox','allow-same-origin');
    document.body.appendChild(iframe);
    iframe.onload=function(){
      // debugger
    };
/* var dom=document.getElementById('app');
var doc=null;
dom.onload=function(){

  doc=dom.contentDocument;
  // debugger
}
 */


</script>